package PD.modules.simulation;

import PD.data.Row;

public class Result {

        public int count = 1;
        private Bug bug;

        public Result(Bug bug) {
                this.bug = bug;
        }

        public void count() {
                count++;
        }

        @Override
        public String toString() {
                String text = "graph [\n\tcomment \"result\"";
                if (this.bug.getFinalDataset() != null) {
                        for (Row nodes : this.bug.getFinalDataset().getNodesRows()) {
                                text += nodes.toString();
                        }
                        for (Row edges : this.bug.getFinalDataset().getEdgesRows()) {
                                text += edges.toString();

                        }
                        text += "\n]";

                }
                text += "\n " + this.bug.getWeight();
                text += "\n ----------------------------------------------------------\n";
                return text;
        }
}
